/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Andrés Felipe
 */
public class Sales implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer saleid;
    private int total;
    private Date creationdate;
    private Date deliverydate;
    private List<ProductXsales> productXsalesList;
    private Customer customeridentification;

    public Sales() {
    }

    public Sales(Integer saleid) {
        this.saleid = saleid;
    }

    public Sales(Integer saleid, int total, Date creationdate) {
        this.saleid = saleid;
        this.total = total;
        this.creationdate = creationdate;
    }

    public Integer getSaleid() {
        return saleid;
    }

    public void setSaleid(Integer saleid) {
        this.saleid = saleid;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public Date getCreationdate() {
        return creationdate;
    }

    public void setCreationdate(Date creationdate) {
        this.creationdate = creationdate;
    }

    public Date getDeliverydate() {
        return deliverydate;
    }

    public void setDeliverydate(Date deliverydate) {
        this.deliverydate = deliverydate;
    }

    public List<ProductXsales> getProductXsalesList() {
        return productXsalesList;
    }

    public void setProductXsalesList(List<ProductXsales> productXsalesList) {
        this.productXsalesList = productXsalesList;
    }

    public Customer getCustomeridentification() {
        return customeridentification;
    }

    public void setCustomeridentification(Customer customeridentification) {
        this.customeridentification = customeridentification;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (saleid != null ? saleid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sales)) {
            return false;
        }
        Sales other = (Sales) object;
        if ((this.saleid == null && other.saleid != null) || (this.saleid != null && !this.saleid.equals(other.saleid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Sales[ saleid=" + saleid + " ]";
    }
    
}
